package core

var (
    onlyReg *register
)

type register struct {
    HandlerContainer []Handler
}

func (this *register) Reg(handler Handler) error {
    this.HandlerContainer = append(this.HandlerContainer, handler)
    return nil
}

func NewRegister() *register {
    if onlyReg == nil {
        onlyReg = new(register)
    }
    return onlyReg
}
